import Vue from 'vue';
import Vuex from 'vuex';
import moduleInfo from './modules/moduleInfo.js'
Vue.use(Vuex);

export default new Vuex.Store({
    state: {
        productNo:'13651896445',
        sessionKey: 'sdadsasbvcghjther'
    },
    actions: {
        setProductNoAction (context, payload) {
            context.commit('setProductNo', payload)
        }
    },
    mutations: {
        setProductNo (state, payload) {
            state.productNo = payload
        },
        setSessionKey (state, payload) {
            state.sessionKey = payload
        }
    },
    getters: {
        productAndSessionKey: (state) => {
            return state.productNo + state.sessionKey
        }
    },
    modules: {
        moduleInfo
    }
})